package com.erp.entity.purchase;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * @author :qinya
 * @PackageName:com.erp.entity.purchase
 * @ClassName: PurchaseReturn
 * @Description: 购货退货单
 * @date : 2025/7/14,11:19
 */
public class PurchaseReturn {

    private Integer purchaseReturnId; // 退货单ID（主键）
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date invoiceDate;    // 单据日期
    private String invoiceCode;       // 单据编号
    private Integer providerId;       // 供应商ID
    private Integer salePersonId;     // 销售人员ID
    private BigDecimal purchaseAmount;  // 退款金额（精度：10,2）
    private Integer discountRate;     // 折扣率（百分比）
    private BigDecimal taxAmount;     // 税额（精度：10,2）
    private BigDecimal hasRefund;     // 已退款金额（精度：10,2）
    private Integer orderState;       // 订单状态（枚举值：如 0-待处理、1-已完成等）
    private Integer orderMakerId;     // 制单人ID
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date orderCreateDate; // 订单创建时间
    private Integer auditorId;        // 审核人ID
    private String remark;            // 备注信息
    private Integer deliveryMethodId; // 交货方式ID
    private Integer companyId;        // 公司ID
    private Integer deleted;          // 逻辑删除标识（0：未删除，1：已删除）
    private Integer invoiceType;      // 单据类型（1是退货单据）
    private List<PurchaseReturnDetail> purchaseReturnDetailList; // 退货单明细列表

    // 冗余字段
    private String providerName;// 供应商名称
    private String providerAddress;// 供应商地址
    private List<String> purchaseOrderCodeList;// 采购单编号列表
    private BigDecimal hasPaid;// 负数的已付金额（已退款金额取反）

    public BigDecimal getPurchaseAmount() {
        return purchaseAmount;
    }

    public void setPurchaseAmount(BigDecimal purchaseAmount) {
        this.purchaseAmount = purchaseAmount;
    }

    public Integer getPurchaseReturnId() {
        return purchaseReturnId;
    }

    public void setPurchaseReturnId(Integer purchaseReturnId) {
        this.purchaseReturnId = purchaseReturnId;
    }

    public Date getInvoiceDate() {
        return invoiceDate;
    }

    public void setInvoiceDate(Date invoiceDate) {
        this.invoiceDate = invoiceDate;
    }

    public String getInvoiceCode() {
        return invoiceCode;
    }

    public void setInvoiceCode(String invoiceCode) {
        this.invoiceCode = invoiceCode;
    }

    public Integer getProviderId() {
        return providerId;
    }

    public void setProviderId(Integer providerId) {
        this.providerId = providerId;
    }

    public Integer getSalePersonId() {
        return salePersonId;
    }

    public void setSalePersonId(Integer salePersonId) {
        this.salePersonId = salePersonId;
    }

    public Integer getDiscountRate() {
        return discountRate;
    }

    public void setDiscountRate(Integer discountRate) {
        this.discountRate = discountRate;
    }

    public BigDecimal getTaxAmount() {
        return taxAmount;
    }

    public void setTaxAmount(BigDecimal taxAmount) {
        this.taxAmount = taxAmount;
    }

    public BigDecimal getHasRefund() {
        return hasRefund;
    }

    public void setHasRefund(BigDecimal hasRefund) {
        this.hasRefund = hasRefund;
    }

    public Integer getOrderState() {
        return orderState;
    }

    public void setOrderState(Integer orderState) {
        this.orderState = orderState;
    }

    public Integer getOrderMakerId() {
        return orderMakerId;
    }

    public void setOrderMakerId(Integer orderMakerId) {
        this.orderMakerId = orderMakerId;
    }

    public Date getOrderCreateDate() {
        return orderCreateDate;
    }

    public void setOrderCreateDate(Date orderCreateDate) {
        this.orderCreateDate = orderCreateDate;
    }

    public Integer getAuditorId() {
        return auditorId;
    }

    public void setAuditorId(Integer auditorId) {
        this.auditorId = auditorId;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Integer getDeliveryMethodId() {
        return deliveryMethodId;
    }

    public void setDeliveryMethodId(Integer deliveryMethodId) {
        this.deliveryMethodId = deliveryMethodId;
    }

    public Integer getCompanyId() {
        return companyId;
    }

    public void setCompanyId(Integer companyId) {
        this.companyId = companyId;
    }

    public Integer getDeleted() {
        return deleted;
    }

    public void setDeleted(Integer deleted) {
        this.deleted = deleted;
    }

    public Integer getInvoiceType() {
        return invoiceType;
    }

    public void setInvoiceType(Integer invoiceType) {
        this.invoiceType = invoiceType;
    }

    public List<PurchaseReturnDetail> getPurchaseReturnDetailList() {
        return purchaseReturnDetailList;
    }

    public void setPurchaseReturnDetailList(List<PurchaseReturnDetail> purchaseReturnDetailList) {
        this.purchaseReturnDetailList = purchaseReturnDetailList;
    }

    public String getProviderName() {
        return providerName;
    }

    public void setProviderName(String providerName) {
        this.providerName = providerName;
    }

    public String getProviderAddress() {
        return providerAddress;
    }

    public void setProviderAddress(String providerAddress) {
        this.providerAddress = providerAddress;
    }

    public List<String> getPurchaseOrderCodeList() {
        return purchaseOrderCodeList;
    }

    public void setPurchaseOrderCodeList(List<String> purchaseOrderCodeList) {
        this.purchaseOrderCodeList = purchaseOrderCodeList;
    }

    public BigDecimal getHasPaid() {
        return hasPaid;
    }

    public void setHasPaid(BigDecimal hasPaid) {
        this.hasPaid = hasPaid;
    }

}
